package com.southwind.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.southwind.entity.Account;
import com.southwind.mapper.AccountMapper;
import com.southwind.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author: liuyuanjiang
 * @date: 2021/10/12
 **/
@Service
public class AccountServiceImpl implements AccountService {

    @Autowired
    private AccountMapper accountMapper;

    @Override
    public Account findByUsername(String username){
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("username" , username);
        return accountMapper.selectOne(wrapper);
    }
}
